require("../css/bootstrap.min.css");
require("../css/swiper-3.4.2.min.css");
require("../css/base.scss");
// 引入 ECharts 主模块
var echarts = require('../../lib/echarts/echarts.min');
// var echarts = require('echarts/lib/echarts');
// // 引入柱状图
// require('echarts/lib/chart/bar');
// // 引入饼状图
// require('echarts/lib/chart/pie');
// // 引入折线图
// require('echarts/lib/chart/line');
// // 引入提示框组件
// require('echarts/lib/component/legend');
// require('echarts/lib/component/tooltip');
// require('echarts/lib/component/title');

var app = angular.module('app', ['ui.router','angularFileUpload','ui.bootstrap','ng.ueditor','ngSanitize','me-lazyload','ui.sortable']);
//创建angular系统主模块app，并对模块所需的子模块进行依赖设置

//项目版本配置

//设置angular全局常量,让项目所有地方都能读取所设置的内容
app.constant('commonConfig',{
    version:'normal',  // 版本控制，原版：normal  普教版（无广告页）：noAdvertising  二职: second
    client_id:'lcsoft',
    client_secret:'123456',
    $webroot: 'http://192.168.0.189:8090/eureka-zuul/',
    $webroot_2:'http://192.168.0.189/lcedu_szez/',  //新版教务接口
    tokenApi:'http://192.168.0.189:8090/oauth-server/',
    cloudHomepage:'http://192.168.0.189:85/cloud/#/',
    cloudAdminHomepage:'http://192.168.0.189:85/cloud-admin/#/',
    developerHomepage:'http://192.168.0.189:85/cloud-developer/#/',
    userHomepage:'http://192.168.0.189:85/user/#/',
    stuHomepage:'http://192.168.0.189:85/student/#',
    teaHomepage:'http://192.168.0.189:85/teacher/#',
    todoHomepage:'http://192.168.0.189:85/todo/#',
    infoHomepage:'http://192.168.0.189:85/info/#',
    //演示地址
    // $webroot: 'http://yun.szlcsoft.com:8090/eureka-zuul/',
    // tokenApi:'http://yun.szlcsoft.com:8090/oauth-server/',
    // cloudHomepage:'http://yun.szlcsoft.com:85/cloud/#/',
    // userHomepage:'http://yun.szlcsoft.com:85/user/#/',
    // stuHomepage:'http://yun.szlcsoft.com:85/student/#',
    // teaHomepage:'http://yun.szlcsoft.com:85/teacher/#',
    // todoHomepage:'http://yun.szlcsoft.com:85/todo/#',
    // infoHomepage:'http://yun.szlcsoft.com:85/info/#',
    //数据端口
    imgApi:'api-dfs/edu-dfs-api/file/IoReadFile',
    cloudApi:'api-cloud/edu-cloud-api/',
    dfsApi:'api-dfs/edu-dfs-api/',
    basisApi:'api-basis/edu-basis-api/',
    dictApi:'api-dict/edu-dict-api/',
    studentApi:'api-student/edu-student-api/',
    teacherApi:'api-teacher/edu-teacher-api/',
    courseApi:'api-course/edu-course-api/',
    userApi:'api-user/edu-user-api/',
    emailApi:'api-email/edu-email-api/',
    voteApi:'api-vote/edu-vote-api/',
    surveyApi:'api-survey/edu-survey-api/',
    smsApi:'api-sms/edu-sms-api/',
    infoApi:'api-info/edu-info-api/',
    todoApi:'api-todo/edu-todo-api/'
    // interfaceApi:'http://yun.szlcsoft.com:9002/'
});
//引入常量使路由active显示 ,将$state，$stateParams引导Dom中
app.run(['$rootScope', '$state', '$stateParams','commonConfig',
    function($rootScope, $state, $stateParams,commonConfig){
        $rootScope.$state = $state;
        $rootScope.$stateParams = $stateParams;
        $rootScope.commonConfig = commonConfig;
        // $rootScope.UserConfig = $localStorage.get('cloud');
    }
]);
//引入angular单页面开发所需的路由配置
app.config(require('./routing'));
//设置angularMVC模式下的服务,公共方法,控制器可以访问公用的服务方法
//app.service('Common',require('./service/Common'));
app.service('$localStorage',require('./service/$localStorage'));
app.service('modelService',require('./service/modelService'));
app.service('RequestService',require('./service/RequestService'));


//设置angular的自定义指令
app.directive('lunbo',require('./directive/lunbo'));
app.directive('stars',require('./directive/stars'));
app.directive('ngThumb', require('./directive/ngThumb'));
app.directive('bindHtmlCompile', require('./directive/htmlComplie'));

//把echarts传入angular作用域中
app.factory('echarts',function(){
    return echarts;
});


